package com.lcl.stock.mapper;

import com.lcl.stock.pojo.domain.InnerMarketDomain;
import com.lcl.stock.pojo.entity.StockMarketIndexInfo;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
* @author 28901
* @description 针对表【stock_market_index_info(国内大盘数据详情表)】的数据库操作Mapper
* @createDate 2025-02-23 15:32:42
* @Entity com.lcl.stock.pojo.entity.StockMarketIndexInfo
*/
public interface StockMarketIndexInfoMapper {

    int deleteByPrimaryKey(Long id);

    int insert(StockMarketIndexInfo record);

    int insertSelective(StockMarketIndexInfo record);

    StockMarketIndexInfo selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(StockMarketIndexInfo record);

    int updateByPrimaryKey(StockMarketIndexInfo record);

    /**
     *根据时间点查询指定大盘编码对应的数据
     * @param currentTime 指定时间点
     * @param marketCodes 大盘编码集合
     * @return
     */
    List<InnerMarketDomain> getMarketInfo(@Param("curDate") Date currentTime,
                                          @Param("maketCodes") List<String> marketCodes);

    /**
     * 统计指定日期范围内 指定大盘每分钟的成交量流水信息
     * @param tStartDate 开盘时间
     * @param tEndDate  当前时间
     * @param inner 大盘编码集合
     * @return
     */
    List<Map> getSumAmtInfo(@Param("startDate")Date tStartDate,
                            @Param("endDate")Date tEndDate,
                            @Param("marketCodes")List<String> inner);
}
